package com.ruicar.afs.cloud.apply.pre.loan.service;

import com.alibaba.fastjson.JSONObject;
import com.ruicar.afs.cloud.apply.common.dto.ProductInfoDTO;
import com.ruicar.afs.cloud.apply.common.entity.ApplyCarDetails;
import com.ruicar.afs.cloud.apply.pre.loan.condition.CarInfoCondition;
import com.ruicar.afs.cloud.bizcommon.business.dto.CalculatorDTO;
import com.ruicar.afs.cloud.bizcommon.business.dto.CalculatorListDTO;
import com.ruicar.afs.cloud.bizcommon.business.entity.FinCostDetails;
import com.ruicar.afs.cloud.common.core.util.IResponse;

import java.util.List;

/**
 * @description:
 * @author: sijun.yu
 * @date: 2020/7/15 15:37
 */
public interface ApplyProductService {

    /**
     * 查询产品列表
     *
     * @param condition
     * @return
     */
    public JSONObject queryProductSelectList(CalculatorDTO condition);

    /**
     * 查询产品详情
     *
     * @param condition
     * @return
     */
    public IResponse queryProductDetails(CalculatorDTO condition);

    /**
     * 获取产品利率
     *
     * @param condition
     * @return
     */
    public IResponse getProductRate(CalculatorDTO condition);

    /**
     * 产品校验
     *
     * @return
     */
    public IResponse checkProductInfo(CalculatorListDTO costInfo);

    /**
     * 风控准入校验
     *
     * @param applyNo
     * @return
     */
    public IResponse chenkRiskInfo(String applyNo);

    /**
     * 调用计算器还款计划表
     *
     * @param list
     * @return
     */
    public IResponse financeCalculation(List<CalculatorDTO> list);

    /**
     * 获取客户利率
     *
     * @param condition
     * @return
     */
    public IResponse getCustRate(CalculatorDTO condition);

    /**
     * 任意贷-还款计划表
     *
     * @param condition
     * @return
     */
    public IResponse getArbitraryRepaymentPlan(CalculatorDTO condition);

    /**
     * 保存融资列表信息
     *
     * @param applyNo
     * @param inList
     * @return
     */
    public List<FinCostDetails> saveCostList(String applyNo, List<CalculatorDTO> inList);

    /**
     * 更新融资列表信息
     *
     * @param applyNo
     * @param inList
     */
    public List<FinCostDetails> updateCostList(String applyNo, List<CalculatorDTO> inList);

    /**
     * 修改车价重新调用计算器
     * @param applyNo
     * @param carDetails
     */
    public void updateFinanceInfoForSalePrice(String applyNo,ApplyCarDetails carDetails,CarInfoCondition condition);

    /**
     * 金融产品-融资计算器-For-App
     * @param condition
     * @return
     */
    public IResponse financeProductCalculation(CalculatorListDTO condition);

    /**
     * 搜索附加项目名称
     * @param condition
     * @return
     */
    public IResponse queryExtrasInfoSonList(ProductInfoDTO condition);

}
